<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./src/assets/index.css" />
    <script src="./node_modules/axios/dist/axios.min.js"></script>
    <script src="./node_modules/vue/dist/vue.global.js"></script>
    <script src="./node_modules/lodash/lodash.min.js"></script>
  </head>
  <body>
    <div class="container">
      <!-- 上面搜索部分 -->
      <div class="search">
        <div class="title">
          <p>综合</p>
          <p>定位</p>
        </div>
        <div class="types">
          <div class="type-list" v-for="(value,key) in types" :key="key">
            <div
              v-for="item in value"
              :key="item.id"
              class="radio"
              :class="{checked:item.id==query.id}"
              @click="changeType(key,item.id)"
            >
              {{item.content}}
            </div>
          </div>
        </div>
        <div class="keyword">
          <div class="input">
            <input
              type="text"
              placeholder="请输入你要搜索的英雄名"
              :value="keyword"
              @input="changeKeyword"
            />
          </div>
        </div>
      </div>

      <!-- 下面列表展示部分 -->
      <ul class="list">
        <li v-for="hero in filteredHeroArr" :key="hero.ename">
          <a :href="href(hero.ename)" target="_blank">
            <img :src="src(hero.ename)" />
            <span v-html="hero.cname"></span>
          </a>
        </li>
      </ul>
    </div>

    <!-- 引入js文件 -->
    <script src="./src/js/index.js"></script>
  </body>
</html>
